Skip to content

Conversation

@DracoLi
Copy link
Contributor

@DracoLi DracoLi commented Dec 18, 2025

Why this should be merged

Separated the logic from #4485.

Adds migration handling for block database.

How this works

Canonical block data is migrated from the KV store to the height-indexed databases in the background.

Migrates headers, bodies, and receipts for canonical blocks; genesis is skipped.
During migration, corresponding KV entries are deleted in batches; header/body/receipt ranges are periodically compacted.
Periodic logs report status and ETA.
Migration can be paused and resumed safely.
Migrating ~71M blocks on a Mainnet node took ~5 hours.

How this was tested

  • Unit tests for migration behavior.
  • Two Mainnet nodes (with state sync enabled and disabled) with blockdb enabled running for >4 weeks.
  • C-Chain migrations at height 1M/10M/20M via reexecution tests and live-node migrations (including one with ~71M blocks).

Need to be documented in RELEASES.md?

@DracoLi DracoLi force-pushed the dl/evm-blockdb-migrator branch from a4c3aad to 4570360 Compare December 18, 2025 19:28
@github-actions
Copy link

This PR has become stale because it has been open for 30 days with no activity. Adding the lifecycle/frozen label will cause this PR to ignore lifecycle events.

@github-actions github-actions bot added the lifecycle/stale Inactive for 60 days label Jan 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lifecycle/stale Inactive for 60 days

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Add evm database that supports separate storage for block data

2 participants